import { useSize } from 'ahooks';
import { Table } from 'antd'
import React from 'react'

export default function ScrollTable(props) {
    const { parentNode } = props;

    const size = useSize(parentNode)

    
    return <Table {...props}
        scroll={{
            ...props.scroll,
            y: size?.height - (props.otherHeight || 100)
        }}
    ></Table>
}